cmake_minimum_required(VERSION 3.28)
project(wakeOnLan C)

# 添加可执行文件目标
add_executable(wakeOnLan main.c)

# 需要链接Paho MQTT C库和Windows Sockets API的实现库
target_link_libraries(wakeOnLan paho-mqtt3a-static)
# 根据平台决定是否链接ws2_32库
if(WIN32)
    target_link_libraries(wakeOnLan ws2_32)
endif()
INSTALL(TARGETS wakeOnLan 
        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
